﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Ccit.ClassLibrary;
using System.Collections.Generic;
using Ccit.SysPlat.Organ;
using Ccit.Utils;

namespace Ccit.UserControls
{
    public partial class range_clause_set : Ccit.Utils.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                _hidOrganId.Value = (null != Request.QueryString["organId"]) ? Request.QueryString["organId"].ToString() : string.Empty;
                initializePage();
            }
        }

        private void initializePage()
        {
            string organId = _hidOrganId.Value;
            List<MsKeyValue> lstData;
            #region 初始化部门
            IDept _deptProcessor = Factory.CreateObject(MsDept.assemblyName, MsDept.className, ImportComponentType.DotNetDll, null) as IDept;
            lstData = _deptProcessor.GetDeptListByOrgan(organId, string.Empty,string.Empty);                        
            CtrInterface.BindListBox(ref selDept, lstData, false, string.Empty);
            _deptProcessor = null;
            #endregion

            #region 初始化职位
            IPos _posProcessor = Factory.CreateObject(MsPos.assemblyName, MsPos.className, ImportComponentType.DotNetDll, null) as IPos;
            lstData = _posProcessor.GetPosListByOrgan(organId, string.Empty,string.Empty);
            CtrInterface.BindListBox(ref selPos, lstData, false, string.Empty);
            _posProcessor = null;
            #endregion

            #region 初始化级别
            IClass _clsProcessor = Factory.CreateObject(MsClass.assemblyName, MsClass.className, ImportComponentType.DotNetDll, null) as IClass;
            lstData = _clsProcessor.GetClsListByOrgan(organId, string.Empty, string.Empty);
            CtrInterface.BindListBox(ref selClass, lstData, false, string.Empty);
            _clsProcessor = null;
            #endregion

            lstData = null;
        }
    }
}
